﻿@model IEnumerable<OrchestrationPort>
<table cellpadding="0" cellspacing="0">
    <tr>
        <th>
            Name
        </th>
        <th>
            Bound To
        </th>
    </tr>
    @foreach (OrchestrationPort port in Model)
    {
        <tr>
            <td>
                @port.Name
            </td>
            <td>
                <a href="@Model.GetReceivePort(port.ReceivePortName.Name).Path(Model.Version)">@port.ReceivePortName.Name</a>
            </td>
        </tr>
    }
    @foreach (OrchestrationPort port in Model.Orchestration.Ports.Cast<OrchestrationPort>().Where(op => op.SendPortName != null))
    {
        <tr>
            <td>
                @port.Name
            </td>
            <td>
                <a href="@Model.GetSendPort(port.SendPortName.Name).Path(Model.Version)">@port.SendPortName.Name</a>
            </td>
        </tr>
    }
</table>
@if (Model != null)
{
    <table cellpadding="0" cellspacing="0">
        <tr>
            <td>
                Address
            </td>
            <td>@Model.Address
            </td>
        </tr>
        <tr>
            <td>
                Type
            </td>
            <td>@Model.Type
            </td>
        </tr>
        <tr>
            <td>
                Ordered Delivery
            </td>
            <td>@Model.OrderedDelivery
            </td>
        </tr>
        <tr>
            <td>
                Retry Count
            </td>
            <td>@Model.OrderedDelivery
            </td>
        </tr>
        <tr>
            <td>
                Retry Interval
            </td>
            <td>@Model.RetryInterval
            </td>
        </tr>
    </table>
    <h3>
        Service Window</h3>
    <table cellpadding="0" cellspacing="0">
        <tr>
            <td>
                Enabled
            </td>
            <td>@Model.ServiceWindow.Enabled
            </td>
        </tr>
        <tr>
            <td>
                Start Date
            </td>
            <td>@Model.ServiceWindow.StartTime
            </td>
        </tr>
        <tr>
            <td>
                End Date
            </td>
            <td>@Model.ServiceWindow.EndTime
            </td>
        </tr>
    </table>
}
